Relication Archive for: Harbridge-Yong, Laurel and Celia Paris. "You Can�t Always Get What You Want: How Majority-Party Agenda-Setting and Ignored Alternatives 
Shape Public Attitudes." Legislative Studies Quarterly.

This archive contains the data files and code to replicate all analysis reported in the paper and online appendix. All data and code files should be put into one directory with a subdirectory titled "output". The output folder is where tables/figures will be exported to. 

To replicate the analyses in the main paper and appendix for Study 1, see the following files:
*Study_1_SSI_analysis.do -- this file opens the raw data ("Study_1_SSI_raw_for_replication.dta"), recodes all relevant variables via "Study_1_SSI_set_up.do" and saves the data set as "Study_1_Agenda_Clean_SSI.dta". This file also provides calculations for sample demographics and balance checks.
*Study_1_analysis_and_figures.R -- this files uses the file outputted in step above and runs regression analyses and creates Figure 2. 
* Variable names and descriptions included in the Stata do file
* Annotation in the code indicates where the key numbers reported in the text originate

To replicate the analyses in the main paper and appendix for Study 2, see the following files:
*Study_2_data_set_up.R -- this file opens the raw data ("Study_2_TESS027_HarbridgeYong_Paris_stata_12.dta") and recodes relevant variables (based on "Study 2 Codebook TESS.xlsx") and saves the data set as "Study_2_TESS_for_analysis.R".
*Study_2_TESS_analysis_and_figures.R -- this files uses the file outputted in step above and runs regression analyses, creates Figure 3, and other calculations. 
* Variable names and descriptions included in the R code and in the excel codebook
* Annotation in the code indicates where the key numbers reported in the text originate

To replicate the analyses in the appendix for models pooling Studies 1 and 2, see the following files:
*Pooled_study_1_and_2_appendix.R -- uses saved files from previous steps to run regressions on the pooled studies

To replicate the analyses in the main paper and appendix for Study 3, see the following files:
*Study_3_Lucid.R -- uses the data in "Lucid_survey_2_5_19_for_analysis.csv" to recode and run the analyses for Study 3.

*Note: file "regtable.R" is used to output regression tables.
